import BackTop from "components/content/backTop/BackTop";

export default function name(params) {
  // 该部分代码，在Home,Detail组件 mounted 中都用到了，所以抽离出来

  const backTopMixin = {
    components: {
      BackTop,
    },
    data() {
      return {
        isShowBackTop: false,
      };
    },
    methods: {
      backTop() {
        // console.log('xxx');
        this.$refs.scrollRef.scrollTo(0, 0, 300);
      },
    },
  };
}
